A Few Useful Things to Know About Power C

I've been working with Power C for a while now, and I've learned a 
few tricks I'd like to share with others.  Hopefully we can help
each other learn this fascinating new language.

1. The disk-swapping discussed in the documentation for those of us
   with one drive really isn't necessary; just move the first seven
   files (shell-translator), plus stdio.h and dir.h from the Editor/
   Compiler disk to your work disk.  The new procedure is then to
   always have the work disk in the drive, except when linking in 
   the function libraries.  When you compile, use the syntax:

        cc -p filename

   This will go through the entire compilation process without 
   asking you to change disks.

2. The "trim" program will trim further an already trimmed file, but
   the resulting code doesn't always work!  Only trim your object
   files once!

3. When passing a variable address to a function (with the intent of
   modifying the value of the original variable directly), declare
   the original variable as "static".  Power C moves the first 32 
   bytes of variables to be passed (unless declare	 static) into zero
   page, so an "auto" variable won't really be at the address which
   was passed.

4. As you write your own functions which can be used in multiple
   programs, build your own function libraries.  Compile and link
   the program "lib.c" on the Power C work disk, then run it.
   Library files must end with ".l".  Once you have a library file
   you can give the linker the name of the library file instead of 
   the names of individual object modules.

5. The speed of the standard 1541 di	  drive is horrible for such a
   disk-based application; I ran out and bought BetterWorking's Turbo
   Load and Save cartridge as recommended in the documentation; it 
   works very well as claimed.

6. For those of us who need a good book to get us started, I can
   heartily recommend "C Primer Plus", by Waite, Prata, and Martin,
   published by Howard W. Sams & Company.  It's more expensive than
   most, but well worth it (it's 558 pages!).

   Good luck,

   Steve Grace
   (70726,306)

